interface RentalProperty {
    public void getRent(int numberofBedrooms);
}

class Apartment implements RentalProperty{
    int apartmentInflationFactor = 150;

    @Override
    public void getRent(int numberOfBedrooms){
        System.out.println("Rent for this Apartment is: "+ numberOfBedrooms*apartmentInflationFactor);
    }
}
class TownHouse implements RentalProperty{
    int townHouseInflationFactor = 200;

    @Override
    public void getRent(int numberOfBedrooms){
        System.out.println("Rent for this Town House is: "+ numberOfBedrooms*townHouseInflationFactor);
    }
}
class Unit implements RentalProperty{
    int unitInflationFactor = 240;

    @Override
    public void getRent(int numberOfBedrooms){
        System.out.println("Rent for this Unit is: "+ numberOfBedrooms*unitInflationFactor);
    }
}

//ADD Your factory class here

public class RentalPropertyDemo{
    public static void main(String[] args){
        //Use this method for test code
//        RentalFactory factory = new RentalFactory();
//        RentalProperty property = factory.createProperty(1);
//        property.getRent(3);
//        property = factory.createProperty(2);
//        property.getRent(1);

        RentalFactory factory = new RentalFactory();
        RentalProperty property = factory.createProperty(2);
        System.out.println(property instanceof RentalProperty);
    }
}